package com.jt.controller;

import com.jt.annotation.RequiredLog;
import com.jt.pojo.Menu;
import com.jt.service.MenuService;
import com.jt.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/menu")
public class MenuController {
    @Autowired
    private MenuService menuService;

    @GetMapping("/getMenuList")
    @RequiredLog
    public SysResult getMenuList(){
        List<Menu> List = menuService.getMenuList();
        return SysResult.success(List);
    }
}
